<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <iframe
      srcdoc="<script>
        window.addEventListener('message', e => {
          console.log(e.data)
        })
      </script>"
      frameborder="0"
    ></iframe>
    <div class="print">hhh</div>
    <button onclick="add()">123</button>
  </body>
</html>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <iframe srcdoc="./game.html" frameborder="0"></iframe>
    <div class="print">hhh</div>
    <button onclick="add()">123</button>
  </body>
</html>
